#!/usr/bin/env sh
set -ex

cd ~/.cargo/registry/src/github.com-*
for i in libc-*; do
  patch -d $i -p1 -i ~/OHOS/openharmony_toolchains/devtools/patches/crates/libc/c90efd90013f97693d589d0fdd9157337e82dafb.patch
done
for i in compiler_builtins-*; do
  patch -d $i -p1 -i ~/OHOS/openharmony_toolchains/devtools/patches/crates/compiler-builtins/8dc0e28e03bc408fb97200939e3e68c2e30d0081.patch
done
